package net.entelijan.cobean.examples.lit;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.miginfocom.swing.MigLayout;

public class AuthorListPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	public JButton getRefreshButton() {
		return this.refreshButton;
	}

	public void setRefreshButton(JButton refreshButton) {
		this.refreshButton = refreshButton;
	}

	public JButton getNewButton() {
		return this.newButton;
	}

	public void setNewButton(JButton newButton) {
		this.newButton = newButton;
	}

	public JButton getEditButton() {
		return this.editButton;
	}

	public void setEditButton(JButton editButton) {
		this.editButton = editButton;
	}

	public JButton getDeleteButton() {
		return this.deleteButton;
	}

	public void setDeleteButton(JButton deleteButton) {
		this.deleteButton = deleteButton;
	}

	public JTable getAuthorsTable() {
		return this.authorsTable;
	}

	public void setAuthorsTable(JTable authorsTable) {
		this.authorsTable = authorsTable;
	}

	private JButton refreshButton = new JButton("Refresh");

	private JButton newButton = new JButton("New");

	private JButton editButton = new JButton("Edit");

	private JButton deleteButton = new JButton("Delete");

	private JTable authorsTable = new JTable();

	public AuthorListPanel() {
		super();
		setLayout(new MigLayout());
		add(ExamplesUtil.createButtonsPanel(100, this.refreshButton),
				"w max, wrap");
		add(new JScrollPane(this.authorsTable), "w max, h max, wrap");
		add(ExamplesUtil.createButtonsPanel(100, this.newButton,
				this.editButton, this.deleteButton), "w max, wrap");
	}

}
